#pragma once

#include <QtWidgets/QVBoxLayout>
#include "multiflowlayout_global.h"
#include <QVector>
#include <QColor>
namespace MultiFlow {
	class FlowWidget;
	class CuttingLine;
	class CuttingLineFactory;
	class MULTIFLOWLAYOUT_EXPORT MultiFlowLayout : public QVBoxLayout
	{
		Q_OBJECT

	public:
		MultiFlowLayout(uint widgetQuantity, CuttingLineFactory* factory, const QColor& color=QColor(Qt::black), uint lineWeight=2, QWidget* parent = nullptr);
		virtual ~MultiFlowLayout();
		bool addWidget(QWidget* widget, int index);
		void setContentsMargins(int left, int top, int right, int bottom, int index = -1);
		void setSpacing(int spacing, int index = -1);
	private:
		QVector<FlowWidget*> m_widgets;
		QVector<CuttingLine*> m_cuttingLines;
		QColor m_cuttingLinesColor;
		uint m_cuttingLinesWeight;
	};
}
